import Cookie from "js-cookie";
export const serverKey = "huochao-server";
export const secretKey = "d7434b6fcff943929c3a884142358139";
export const version = "v1.0.0";
export const appVersion = "v1.0.0";

export const ywServer = "https://newapp.evcoming.com/sharego";

export const servers = [
  { label: "正式环境", value: "http://112.14.19.189:8080/api" },
  { label: "预发版", value: "https://apix.evcoming.com/partner-front-api" },
  {
    label: "测试环境",
    value: "http://test.evcoming.com:9001/partner-front-api"
  }
];

export const BASE_API = Cookie.get(serverKey) || servers[0].value;
export function setServer(value) {
  return Cookie.set(serverKey, value);
}

export const jsApiList = [
  "openLocation",
  "getLocation",
  "hideOptionMenu",
  "showMenuItems",
  "hideMenuItems",
  "closeWindow",
  "onMenuShareTimeline",
  "onMenuShareAppMessage",
  "scanQRCode",
  "chooseWXPay",
  "hideAllNonBaseMenuItem",
  "chooseImage",
  "uploadImage",
  "updateTimelineShareData",
  "updateAppMessageShareData"
];
